/*
*  生成自定义工具条
*-----------------------调用实例-----------------------
*  createToolBarHead();
*  createToolBarLeft("岳椿","javascript:alert('yuechun')");
*  createToolBar("岳椿","http://www.163.com");
*  createToolBar("岳椿","http://www.163.com");
*  createToolBar("岳椿","http://www.163.com");
*  createToolBar("岳椿","http://www.163.com");
*  createToolBar("岳椿","http://www.163.com");
*  createToolBarBottom();
*-----------------------------------------------------
*/

function createToolBarHead(){
  document.write("<STYLE type=text/css>A:link {COLOR: black; TEXT-DECORATION: none}");
  document.write("A:visited {COLOR: 2262E8; TEXT-DECORATION: none}");
  document.write("A:active {COLOR: black; TEXT-DECORATION: none}");
  document.write("A:hover {COLOR: #009933; TEXT-DECORATION: none}");
  document.write("A:link {COLOR: #2262E8; TEXT-DECORATION:none }");
  document.write("TD {FONT-FAMILY: Verdana; FONT-SIZE: 9pt}");
  document.write("TH {FONT-FAMILY: Verdana; FONT-SIZE: 9pt}");
  document.write("INPUT {FONT-FAMILY: Verdana; FONT-SIZE: 9pt}");
  document.write("SELECT {FONT-FAMILY: Verdana; FONT-SIZE: 9pt}");
  document.write(".menuStyle {FONT-FAMILY: Arial,Geneva,Verdana,Helvetica; FONT-SIZE: 9pt; FONT-WEIGHT: bold; TEXT-DECORATION: none}</STYLE>");
  document.write("<table border=1 cellpadding=0 cellspacing=0  align=left>");
  document.write("<tr bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6>");
}

function createToolBarLeft(name,action){
  //写左边的分割条
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center><img height=22 src='/img/common/toolbar1.gif' width=5></td>");
  //写按钮
  document.write("<td align=absmiddle valign=center noWrap width='50'>")
  document.write("<table border=1 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 cellpadding=0 cellspacing=0 height=22 ")
  document.write("onMouseDown=\"javascript:this.borderColorDark='#ffffff' ;this.borderColorLight='#808080' ;\"onMouseOut=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("onMouseOver=\"javascript:this.borderColorDark='#808080' ;this.borderColorLight='#fffff' ;\"onMouseUp=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("style='CURSOR: hand' width='100%'>")
  document.write("<tr><td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>")
  document.write("<a href=" + action + ">" + name + "</a></td></tr></table></td>");
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>");
  document.write("<img height=22 src='/img/common/toolbar2.gif' width=4></td>");
}

/**
* 用来处理action为"#" onclick=""时的情况
* @return
*/
function createToolBarLeft2(name,action){
  //写左边的分割条
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center><img height=22 src='/img/common/toolbar1.gif' width=5></td>");
  //写按钮
  document.write("<td align=absmiddle valign=center noWrap width='50'>")
  document.write("<table border=1 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 cellpadding=0 cellspacing=0 height=22 ")
  document.write("onMouseDown=\"javascript:this.borderColorDark='#ffffff' ;this.borderColorLight='#808080' ;\"onMouseOut=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("onMouseOver=\"javascript:this.borderColorDark='#808080' ;this.borderColorLight='#fffff' ;\"onMouseUp=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("style='CURSOR: hand' width='100%'>")
  document.write("<tr><td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>")
  document.write("<a href='#' onclick=" + action + ">" + name + "</a></td></tr></table></td>");
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>");
  document.write("<img height=22 src='/img/common/toolbar2.gif' width=4></td>");
}

function createToolBarMLeft(){
  //写左边的分割条
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center><img height=22 src='/img/common/toolbar1.gif' width=5></td>");
  //写按钮
  document.write("<td align=absmiddle valign=center noWrap width='50'>")
  document.write("<table border=1 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 cellpadding=0 cellspacing=0 height=22 ")
  document.write("onMouseDown=\"javascript:this.borderColorDark='#ffffff' ;this.borderColorLight='#808080' ;\"onMouseOut=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("onMouseOver=\"javascript:this.borderColorDark='#808080' ;this.borderColorLight='#fffff' ;\"onMouseUp=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("style='CURSOR: hand' width='100%'>")
  document.write("<tr><td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>")
  document.write(" </td></tr></table></td>");
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>");
  document.write("<img height=22 src='/img/common/toolbar2.gif' width=4></td>");
}
/**
* 用来处理action为"#" onclick=""时的情况
* @return
*/
function createToolBar2(name,action){
  //alert("<a href='#' onClick='" + action + "'>" + name + "</a>")
  document.write("<td align=absmiddle valign=center noWrap width='50'>")
  document.write("<table border=1 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 cellpadding=0 cellspacing=0 height=22 ")
  document.write("onMouseDown=\"javascript:this.borderColorDark='#ffffff' ;this.borderColorLight='#808080' ;\"onMouseOut=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("onMouseOver=\"javascript:this.borderColorDark='#808080' ;this.borderColorLight='#fffff' ;\"onMouseUp=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("style='CURSOR: hand' width='100%'>")
  document.write("<tr><td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>")
  document.write("<a href='#' onClick=" + action + ">" + name + "</a></td></tr></table></td>");
  document.write("<td align=middle bgcolor='#ECEAE6' bordercolordark='#ECEAE6' bordercolorlight='#ECEAE6' noWrap valign=center>");
  document.write("<img height=22 src='/img/common/toolbar2.gif' width=4></td>");
}

function createToolBar(name,action){
  document.write("<td align=absmiddle valign=center noWrap width='50'>")
  document.write("<table border=1 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 cellpadding=0 cellspacing=0 height=22 ")
  document.write("onMouseDown=\"javascript:this.borderColorDark='#ffffff' ;this.borderColorLight='#808080' ;\"onMouseOut=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("onMouseOver=\"javascript:this.borderColorDark='#808080' ;this.borderColorLight='#fffff' ;\"onMouseUp=\"javascript:this.borderColorDark='#ECEAE6' ;this.borderColorLight='#ECEAE6' ;\" ")
  document.write("style='CURSOR: hand' width='100%'>")
  document.write("<tr><td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center>")
  document.write("<a href=" + action + " target='_self'>" + name + "</a></td></tr></table></td>");
  document.write("<td align=middle bgcolor='#ECEAE6' bordercolordark='#ECEAE6' bordercolorlight='#ECEAE6' noWrap valign=center>");
  document.write("<img height=22 src='/img/common/toolbar2.gif' width=4></td>");
}

function createToolBarBottom(){
  document.write("<td align=center bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center width=100%></td>");
  document.write("<td align=middle bgcolor=#ECEAE6 bordercolordark=#ECEAE6 bordercolorlight=#ECEAE6 noWrap valign=center width=100%><img height=22 src='/img/common/toolbar1.gif' width=5></td>");
  document.write("</tr>");
  document.write("</table>");
}

